
// 清除登陆信息
export function clearLoginInfo() {
	uni.clearStorageSync()
	uni.redirectTo({
		url: '/pages/login/login'
	})
}

// 登陆状态验证
export function loginStatusVerify() {
	let token
	try {
		token = uni.getStorageSync('token')
		if (!token) {
			clearLoginInfo()
		}else {
			return token
		}
	} catch (e) {
		clearLoginInfo()
		return ''
	}
}